Skip to main content
POST
/
v1
/
flux-pro-1.0-fill
Generate an image with FLUX.1 Fill [pro] using an input image and mask.
curl --request POST \
  --url https://api.bfl.ai/v1/flux-pro-1.0-fill \
  --header 'Content-Type: application/json' \
  --header 'x-key: <api-key>' \
  --data '{
  "image": "<string>",
  "mask": "<string>",
  "prompt": "ein fantastisches bild",
  "steps": 50,
  "prompt_upsampling": true,
  "seed": 123,
  "guidance": 50.75,
  "output_format": "jpeg",
  "safety_tolerance": 2,
  "webhook_url": "<string>",
  "webhook_secret": "<string>"
}'
{
  "id": "<string>",
  "polling_url": "<string>"
}

Authorizations

x-key
string
header
required

Body

application/json
image
string
required

A Base64-encoded string representing the image you wish to modify. Can contain alpha mask if desired.

mask
string | null

A Base64-encoded string representing a mask for the areas you want to modify in the image. The mask should be the same dimensions as the image and in black and white. Black areas (0%) indicate no modification, while white areas (100%) specify areas for inpainting. Optional if you provide an alpha mask in the original image. Validation: The endpoint verifies that the dimensions of the mask match the original image.

prompt
string | null
default:""

The description of the changes you want to make. This text guides the inpainting process, allowing you to specify features, styles, or modifications for the masked area.

Example:

"ein fantastisches bild"

steps
integer | null
default:50

Number of steps for the image generation process

Required range: 15 <= x <= 50
Example:

50

prompt_upsampling
boolean | null
default:false

Whether to perform upsampling on the prompt. If active, automatically modifies the prompt for more creative generation

seed
integer | null

Optional seed for reproducibility

guidance
number | null
default:60

Guidance strength for the image generation process

Required range: 1.5 <= x <= 100
output_format
enum<string> | null
default:jpeg

Output format for the generated image. Can be 'jpeg' or 'png'.

Available options:
jpeg,
png
safety_tolerance
integer
default:2

Tolerance level for input and output moderation. Between 0 and 6, 0 being most strict, 6 being least strict.

Required range: 0 <= x <= 6
Example:

2

webhook_url
string<uri> | null

URL to receive webhook notifications

Required string length: 1 - 2083
webhook_secret
string | null

Optional secret for webhook signature verification

Response

Successful Response

  • AsyncResponse
  • AsyncWebhookResponse
id
string
required
polling_url
string
required